export default [
  {
    path: '/',
    component: () => import('@/views/layout/index.vue'),
    children: [
      {
        path: '/',
        component: () => import('@/views/home.vue'),
        meta: {
          auth: true,
        },
      },
      {
        path: '/profile',
        component: () => import('@/views/profile/index.vue'),
        meta: {
          auth: true,
        },
      },
    ],
  },

  {
    path: '/login/:id?',
    component: () => import('@/views/auth/login.vue'),
  },
  {
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/error/404.vue'),
    meta: {
      auth: false,
      title: '404',
    },
  },
  {
    path: '/courses/:id',
    component: () => import('@/views/courses/show.vue'),
    meta: {
      auth: true,
    },
  },
  {
    path: '/search/:keyword',
    component: () => import('@/views/search.vue'),
    meta: {
      auth: true,
    },
  },
  {
    path: '/collections/:id',
    component: () => import('@/views/collections/show.vue'),
    meta: {
      auth: true,
    },
  },
  {
    path: '/ip',
    component: () => import('@/views/ip/home.vue'),
    meta: {
      auth: true,
    },
  },
  {
    path: '/ip/materials/:id',
    component: () => import('@/views/ip/material.vue'),
    meta: {
      auth: true,
      title: '素材详情',
    },
  },
  {
    path: '/ip/materials/:id/record',
    component: () => import('@/views/ip/record.vue'),
    meta: {
      auth: true,
      title: '录制素材',
    },
  },
  {
    path: '/ip/materials/favorites',
    component: () => import('@/views/ip/favorites.vue'),
    meta: {
      auth: true,
      title: '我的收藏',
    },
  },
  {
    path: '/ip/materials/search',
    component: () => import('@/views/ip/search.vue'),
    meta: {
      auth: true,
      title: '搜索',
    },
  },
  {
    path: '/ip/videos',
    component: () => import('@/views/ip/videos.vue'),
    meta: {
      auth: true,
    },
  },
  {
    path: '/ip/viewVideo',
    component: () => import('@/views/ip/viewVideo.vue'),
    meta: {
      auth: true,
    },
  },
  {
    path: '/ip/videoDetails',
    component: () => import('@/views/ip/videoDetails.vue'),
    meta: {
      auth: true,
      title: '视频详情',
    },
  },
  {
    path: '/ip/my',
    component: () => import('@/views/ip/my.vue'),
    meta: {
      auth: true,
      title: '个人中心',
    },
  },
  {
    path: '/feedback',
    component: () => import('@/views/feedback/index.vue'),
    meta: {
      auth: true,
      title: '意见反馈',
    },
  },
  {
    path: '/feedback/details',
    component: () => import('@/views/feedback/details.vue'),
    meta: {
      auth: true,
      title: '意见反馈',
    },
  },
  {
    path: '/profile/studyRecord',
    component: () => import('@/views/profile/studyRecord.vue'),
    meta: {
      auth: true,
      title: '学习记录',
    },
  },
  {
    path: '/profile/modifyPassword',
    component: () => import('@/views/profile/modifyPassword.vue'),
    meta: {
      auth: true,
      title: '修改密码',
    },
  },
  {
    path: '/articleDetails/:id',
    component: () => import('@/views/articleDetails.vue'),
    meta: {
      auth: true,
      title: '文章详情',
    },
  },
]
